// pages/flights/flights.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
      cLine:[
          { text: '发车时间', goodsId: 0 },
          { text: '上车地点', goodsId: 1 },
          { text: '下车地点', goodsId: 2 },
      ],
      tab:[
          { tabText: '05:00', textsId: 0 },
          { tabText: '05:00', textsId: 1 },
          { tabText: '05:00', textsId: 2 },
          { tabText: '05:00', textsId: 3 },
          { tabText: '05:00', textsId: 4 },
          { tabText: '05:00', textsId: 5 },
          { tabText: '05:00', textsId: 6 },
          { tabText: '05:00', textsId: 7 }
      ],
      selectPoint:[
          { text: '莲花池客运站', time: '05:30', surplus: '5', other: '北京丰台区客运站'},
          { text: '莲花池客运站', time: '05:30', surplus: '5', other: '北京丰台区客运站'},
          { text: '莲花池客运站', time: '05:30', surplus: '5', other: '北京丰台区客运站'},
          { text: '莲花池客运站', time: '05:30', surplus: '5', other: '北京丰台区客运站'},
          { text: '莲花池客运站', time: '05:30', surplus: '5', other: '北京丰台区客运站'},
          { text: '莲花池客运站', time: '05:30', surplus: '5', other: '北京丰台区客运站'},
          { text: '莲花池客运站', time: '05:30', surplus: '5', other: '北京丰台区客运站'},
          { text: '莲花池客运站', time: '05:30', surplus: '5', other: '北京丰台区客运站'},
         
      ],
      currentItemId: 0,
      aHide:true,
      bHide:false,
      cHide:false,
      targetId:'',
      selectsId:0,
      RMB:0.00
  },
  clickTap: function (e) {
      var that=this
      this.setData({
          currentItemId: e.currentTarget.dataset.num
      })
      var currentItemId = that.data.currentItemId
      if (currentItemId==0){
          this.setData({
              aHide: true,
              bHide: false,
              cHide: false
          })
      } else if(currentItemId == 1){
          this.setData({
              aHide: false,
              bHide: true,
              cHide: false
          })
      }else{
          this.setData({
              aHide: false,
              bHide: false,
              cHide: true
          })
      }
  }, 
  selectTime:function(e){
      var that=this
      that.setData({
          targetId: e.target.dataset.num
      })
      console.log(e);
  },
  selectImg:function(e){
      var that = this
      console.log(that.data.selectPoint)
      that.setData({
          selectsId: e.target.dataset.num
      })
  },
  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {
  
  },

  /**
   * 生命周期函数--监听页面初次渲染完成
   */
  onReady: function () {
      this.mapCtx = wx.createMapContext('map')
  },

  /**
   * 生命周期函数--监听页面显示
   */
  onShow: function () {
  
  },

  /**
   * 生命周期函数--监听页面隐藏
   */
  onHide: function () {
  
  },

  /**
   * 生命周期函数--监听页面卸载
   */
  onUnload: function () {
  
  },

  /**
   * 页面相关事件处理函数--监听用户下拉动作
   */
  onPullDownRefresh: function () {
  
  },

  /**
   * 页面上拉触底事件的处理函数
   */
  onReachBottom: function () {
  
  },

  /**
   * 用户点击右上角分享
   */
  onShareAppMessage: function () {
  
  }
})